<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center servicePackage_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub servicePackage_fd0_0'>
					<view class='flex flex-wrap align-center servicePackage_fd0_0_c0' @tap="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  servicePackage_fd0_0_c0_c0'>&#xe794;</text>
					</view>
					<text class='servicePackage_fd0_0_c1'>服务套餐</text>
					<view class='flex flex-wrap align-center servicePackage_fd0_0_c0'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout servicePackage_flex_1">
				<template v-for='(item,key0) in cardList'>
					<view class='flex flex-wrap align-center servicePackage_fd1_0' :key='key0' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/my/cardDetails/cardDetails?id=${item.aid}`">
						<image class='servicePackage_fd1_0_c0' mode="aspectFill" :src='item.picture'></image>
						<view class='flex flex-direction flex-wrap align-stretch flex-sub servicePackage_fd1_0_c1'>
							<text class='flex-sub servicePackage_fd1_0_c1_c0'>{{item.service_meal_name}}</text>
							<text class='servicePackage_fd1_0_c1_c1'>{{item.subtitle}}</text>
							<view class='flex flex-wrap align-center'>
								<view class='flex flex-direction flex-wrap align-stretch flex-sub'>
									<view class='flex flex-wrap align-center servicePackage_fd1_0_c1_c2_c0_c0'>
										<text class='servicePackage_fd1_0_c1_c2_c0_c0_c0'>￥</text>
										<text class=' servicePackage_fd1_0_c1_c2_c0_c0_c1'>
											<text
												class=' servicePackage_price1_fd1_0_c1_c2_c0_c0_c1'>{{ item.meal_price | frontPrice }}</text>
											<text
												class=' servicePackage_price2_fd1_0_c1_c2_c0_c0_c1'>{{ item.meal_price | laterPrice }}</text>
										</text>
									</view>
									<view class='flex flex-wrap align-center'>
										<text class='servicePackage_fd1_0_c1_c2_c0_c1_c0'>服务总价值</text>
										<text class='servicePackage_fd1_0_c1_c2_c0_c1_c0'>￥</text>
										<text class='servicePackage_fd1_0_c1_c2_c0_c1_c0'>{{item.scribe_money}}</text>
									</view>
								</view>
								<button class='self-end servicePackage_fd1_0_c1_c2_c1' @tap.stop="handleJumpDiy"
									data-type="navigateTo"
									:data-url="`/pages/my/cardDetails/cardDetails?id=${item.aid}`">立即抢购</button>
							</view>
						</view>
					</view>
				</template>
				<fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
					:listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
			</view>

			<!---flex布局flex布局结束-->
			<view class="flex flex-wrap align-start justify-center benben-position-layout flex servicePackage_flex_2">
				<button class='servicePackage_fd2_0' @tap.stop="handleJumpDiy" data-type="navigateTo"
					:data-url="`/pages/my/cardRedemption/cardRedemption`">次卡兑换</button>
				<button class='servicePackage_fd2_1' @tap.stop="handleJumpDiy" data-type="navigateTo"
					:data-url="`/pages/my/packageRecord/packageRecord`">我的套餐</button>

			</view>
			<view :style="{height: '120rpx'}"></view>


		</view>
	</view>
</template>
<script>
	import pagingList from '@/common/mixin/paging_list.js';
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},
		mixins: [pagingList],

		data() {
			return {
				"minixPagingListsApi": "",
				"pageingListApiMethod": "",
				"allowOnloadGetList": false,
				"cardList": [],
				"addressCity": {
					"text": ""
				}
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {

		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {
			this.getCardFunc()
		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {
			this.getCardFunc()
		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//获取次卡列表
			getCardFunc() {
				this.addressCity = uni.getStorageSync('cityinfo')
				this.minixPagingListsApi = global.apiUrls.post653368ba77641;
				this.pageingListApiMethod = 'post';
				this.allowOnloadGetList = false;
				this.pagingListPostDataContent = {
					city: this.addressCity.text
				}
				this.listData = [];
				this.cardList = this.listData;
				this.pagingListToggle();

			},
			pagingListPostData() {
				return this.pagingListPostDataContent
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: rgba(248, 248, 248, 1);
		background-size: 100% auto;
	}

	.servicePackage_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.servicePackage_fd0_0_c1 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333;
	}

	.servicePackage_fd0_0_c0_c0 {
		font-size: 32rpx;
		color: #333;
	}

	.servicePackage_fd0_0_c0 {
		width: 120rpx;
		height: 88rpx;
	}

	.servicePackage_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
	}

	.servicePackage_flex_1 {
		padding: 20rpx 24rpx 0rpx 24rpx;
	}

	.servicePackage_fd1_0_c1_c2_c1 {
		background: var(--benbenbgColor2);
		border-radius: 30rpx 30rpx 30rpx 30rpx;
		font-size: 24rpx;
		color: #fff;
		width: 140rpx;
		height: 54rpx;
		line-height: 54rpx;
		margin: 0rpx 0rpx 0rpx auto;
	}

	.servicePackage_fd1_0_c1_c2_c0_c1_c0 {
		font-size: 24rpx;
		font-weight: 400;
		color: #999999;
		line-height: 33rpx;
	}

	.servicePackage_price2_fd1_0_c1_c2_c0_c0_c1 {
		font-size: 28rpx;
	}

	.servicePackage_price1_fd1_0_c1_c2_c0_c0_c1 {
		font-size: 32rpx;
	}

	.servicePackage_fd1_0_c1_c2_c0_c0_c1 {
		color: #ff5536;
		font-weight: 600;
	}

	.servicePackage_fd1_0_c1_c2_c0_c0_c0 {
		font-size: 24rpx;
		font-weight: 400;
		color: rgba(255, 85, 54, 1);
		line-height: 33rpx;
	}

	.servicePackage_fd1_0_c1_c2_c0_c0 {
		margin: 0rpx 0rpx 8rpx 0rpx;
	}

	.servicePackage_fd1_0_c1_c1 {
		font-size: 20rpx;
		font-weight: 400;
		color: #333333;
		line-height: 33rpx;
		margin: 0rpx 10rpx 8rpx 0rpx;
	}

	.servicePackage_fd1_0_c1_c0 {
		color: #333333;
		font-size: 32rpx;
		font-weight: 700;
		line-height: 45rpx;
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		margin: 0rpx 0rpx 8rpx 0rpx;
	}

	.servicePackage_fd1_0_c1 {
		margin: 0rpx 0rpx 0rpx 24rpx;
	}

	.servicePackage_fd1_0_c0 {
		width: 180rpx;
		height: 180rpx;
		border-radius: 15rpx 15rpx 15rpx 15rpx;
	}

	.servicePackage_fd1_0 {
		background: rgba(255, 255, 255, 1);
		background-size: 100% auto;
		border-radius: 16rpx;
		padding: 24rpx 24rpx 24rpx 24rpx;
		margin: 0rpx 0rpx 20rpx 0rpx;
	}

	.servicePackage_flex_2 {
		width: 750rpx;
		height: 120rpx;
		overflow: hidden;
		z-index: 10;
		bottom: calc(0rpx + var(--window-bottom));
	}

	.servicePackage_fd2_1 {
		background: var(--benbenbgColor2);
		border-radius: 40rpx 40rpx 40rpx 40rpx;
		width: 260rpx;
		line-height: 80rpx;
		font-size: 32rpx;
		color: #fff;
		height: 80rpx;
		margin: 0rpx 0rpx 0rpx 100rpx;
	}

	.servicePackage_fd2_0 {
		background: var(--benbenbgColor2);
		border-radius: 40rpx 40rpx 40rpx 40rpx;
		width: 260rpx;
		line-height: 80rpx;
		font-size: 32rpx;
		color: #fff;
		height: 80rpx;
	}
</style>